package com.ljy.system.marvel_sys.system.controller;

import com.ljy.system.marvel_sys.system.service.IDepartmentService;
import com.ljy.system.marvel_sys.common.util.dtree.DtreeUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 〈功能简述〉<br>
 * 部门相关控制
 * @author LiJunYi
 * @create 2019/7/15
 * @since 1.0.0
 */
@Controller
@RequestMapping("dep")
public class DepController {

    @Autowired
    IDepartmentService departmentService;

    /** 部门树形结构*/
    @RequestMapping("list")
    @ResponseBody
    public DtreeUtil listDep(){
    return departmentService.listDepartment();
    }
}
